/*
 * @Author: huangrongji
 * @Date: 2021-11-27 20:45:13
 * @LastEditors: huangrongji
 * @LastEditTime: 2021-11-27 20:46:27
 * @Description: file content
 */

// 对字符串集合随机排列，随机输出指定的长度
export const randomString = length => {
  var str = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
  var result = '';
  for (var i = length; i > 0; --i) 
    result += str[Math.floor(Math.random() * str.length)];
  return result;
}